package com.cabal.common.enums;

/**
 * 请求用户信息
 *
 * @author shenkang
 * @data 2022年4月25日
 */
public enum RequestMessageType {

    DECLARATION_MESSAGE("declaration"),
    ;


    private String path;

    RequestMessageType(String path){
        this.path = path;
    }


    public String getPath() {
        return this.path;
    }

    public static RequestMessageType getType(String uri){
        if(uri != null){
            for (RequestMessageType value : RequestMessageType.values()) {
                if(uri.contains(value.path)){
                    return value;
                }
            }
        }

        return null;
    }
}
